package com.situ.mall.common.mapper;

import com.situ.mall.common.entity.Member;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author membergpf
 * @since 2023-03-21
 */
public interface MemberMapper extends BaseMapper<Member> {
    List<Member> selectListPage(String keyword);
    @Update("update member set status=1 where id =#{id}")
    void on(Integer id);

    @Update("update member set status=0 where id =#{id}")
    void off(Integer id);
    @Select("select * from member where username =#{username}")
    List<Member> selectByUsername(String username);
    @Select("select * from member where username=#{username}")
    Member selectByUsername2(String username);
}

